package com.hongyun.tms.common.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hongyun.tms.common.annotation.Dict;
import com.hongyun.tms.common.annotation.excel.ExcelInfo;
import com.hongyun.tms.infra.excel.converter.LocalDateTimeOrDateConverter;
import com.hongyun.tms.infra.excel.converter.dict.DictConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 船舶 响应
 *
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
@ExcelInfo(fileName = "大船规范导出")
public class MShipVO implements Serializable {

    @ApiModelProperty(value = "主键")
    @ExcelIgnore
    private Long id;

    @ApiModelProperty(value = "中文船名")
    @ExcelProperty(value = "船名", index = 0)
    private String shipName;

    @ApiModelProperty(value = "英文船名")
    @ExcelIgnore
    private String shipNameEn;

    @ApiModelProperty(value = "船舶类型代码，字典")
    @Dict(code = "SHIP_KIND", fieldName = "shipKindName")
    @ExcelProperty(value = "船舶类型", index = 1, converter = DictConverter.class)
    private String shipKindCode;

    @ApiModelProperty(value = "船舶国籍代码，字典")
    @Dict(code = "SHIP_NATION", fieldName = "nationName")
    @ExcelProperty(value = "船舶国籍", index = 2, converter = DictConverter.class)
    private String notionCode;

    @ApiModelProperty(value = "IMO")
    @ExcelProperty(value = "IMO", index = 3)
    private String imo;

    @ApiModelProperty(value = "呼号")
    @ExcelProperty(value = "呼号", index = 4)
    private String callNo;

    @ApiModelProperty(value = "MMSI")
    @ExcelProperty(value = "MMSI", index = 5)
    private String mmsi;

    @ApiModelProperty(value = "船长")
    @ExcelProperty(value = "船长", index = 6)
    private BigDecimal shipLength;

    @ApiModelProperty(value = "船宽")
    @ExcelProperty(value = "船宽", index = 7)
    private BigDecimal shipWidth;

    @ApiModelProperty(value = "总吨")
    @ExcelProperty(value = "总吨", index = 8)
    private BigDecimal totalTon;

    @ApiModelProperty(value = "净吨")
    @ExcelProperty(value = "净吨", index = 9)
    private BigDecimal netTon;

    @ApiModelProperty(value = "载重吨")
    @ExcelProperty(value = "载重吨", index = 10)
    private BigDecimal dwt;

    @ApiModelProperty(value = "舱口数")
    @ExcelProperty(value = "舱口数", index = 11)
    private Integer hatchNum;

    @ApiModelProperty(value = "航速")
    @ExcelProperty(value = "航速", index = 12)
    private BigDecimal speed;

    @ApiModelProperty(value = "船上电话")
    @ExcelProperty(value = "船上电话", index = 13)
    private String shipPhone;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelProperty(value = "创建时间", converter = LocalDateTimeOrDateConverter.class, index = 14)
    private LocalDateTime createTime;


    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelIgnore
    private LocalDateTime updateTime;
}

